﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo
{
    [NHibernateEntity(Table = "Addresses", Lazy = true)]
    public class Address : ITrackable, IDefault
    {
        public Address() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [ReadOnly]
        [Property(Insert = false, Update = false)]
        public virtual string Name { get; set; }


        [BelongsTo(Column = "ID_Country")]
        public virtual Country Country { get; set; }

        [BelongsTo(Column = "ID_District")]
        public virtual District District { get; set; }

        [Property]
        public virtual string City { get; set; }

        [Property]
        public virtual string StreetName { get; set; }

        [Property]
        public virtual string StreetNumber { get; set; }


        [Property]
        public virtual string BuildingName { get; set; }

        [Property]
        public virtual string BuildingNumber { get; set; }

        [Property]
        public virtual string FloorNumber { get; set; }

        [Property]
        public virtual string ApartmentNumber { get; set; }

        [Property]
        public virtual string POCode { get; set; }

        [Property]
        public virtual bool IsDefault { get; set; }



        [Property]
        public virtual string Description { get; set; }

        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }
}
